const router = require("express").Router();
const Auth = require("../../../middleware/auth");
const { Validate, notice } = require("../../../validate");
const NoticeController = require("../../../controllers/notice");

// 获取通知
router.get("/list", NoticeController.list);

// 管理员获取所有通知
router.get("/getall", Auth.session, NoticeController.getAll);
// 管理员创建通知
router.post(
    "/create",
    Auth.session,
    Validate(notice.creat),
    NoticeController.create
);

module.exports = router;
